<template>
  <div>
      <el-table
    :data="tableData"
    style="width: 97%;margin-left: 20px;
 border-radius: 10px;"
    >
    <el-table-column
      prop="content"
      label="评价"
      >
    </el-table-column>
    <el-table-column
      prop="ctime"
      label="时间"
      :formatter="dateFormat"
      >
    </el-table-column>
   
  </el-table>
  </div>
</template>

<script>
  import axios from "axios";
  import moment from "moment"
export default {
  
  data() {
    
    return {
      tableData: [],
    };
  },
  mounted () {
    
    this.download();;
  },
  methods: {
    download() {
      var url = "http://localhost:3000/comment/infor/没bug";
      axios.get(url).then((res) => {
        console.log(res);
        this.tableData = res.data.data
      });
    },
    
      /*日期处理*/
      dateFormat:function(row,column){
      var date = row[column.property];
      if(date === undefined){
        return ''
      }
      return moment(date).format("YYYY-MM-DD HH:mm:ss")
    },
  },
};
</script>

<style lang="scss" scoped>
.el-table{
  margin: 0;
}
</style>